## -*- mode: R -*-
## This program is fre esoftware: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## any later version.
##
## This program is distributed in the hope that it will be useful
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.
## Authors: L. Finos, M. Redaelli

project.config=list()
## +++++++++++++++++++++++++++++++++++++++
## project.name
## +++++++++++++++++++++++++++++++++++++++
project.config$project.name='changeme'

## +++++++++++++++++++++++++++++++++++++++
## eval.function
## +++++++++++++++++++++++++++++++++++++++
## at the moment, ltp is the first and only one supported function
project.config$eval.function='ltp'

## +++++++++++++++++++++++++++++++++++++++
## info for import / export CSV
## +++++++++++++++++++++++++++++++++++++++
project.config$csv.sep=';'
project.config$csv.dec=','
#project.config$csv.quote='\"'

## +++++++++++++++++++++++++++++++++++++++
## period.start & period.end
## +++++++++++++++++++++++++++++++++++++++
## a period is a couple of values
## the first one is usually the year
## the second one is a number depending on a frequency (period.end)
project.config$period.start=c(1997,1)
project.config$period.end=c(2010,2)

## +++++++++++++++++++++++++++++++++++++++
## period.freq
## +++++++++++++++++++++++++++++++++++++++
## for annual data use 1
## for monthly data use 12
project.config$period.freq=2

## +++++++++++++++++++++++++++++++++++++++
## keys and values
## +++++++++++++++++++++++++++++++++++++++
project.config$keys=c('KEY1','KEY2','KEY3')
project.config$values=c('V2','V2')

## +++++++++++++++++++++++++++++++++++++++
## save
## +++++++++++++++++++++++++++++++++++++++
## save=list('gitems','summary','model','images','report')
## gitems: means that grouped items (for instance items at key1 level, ..)
##    will be added
## model: a file model.Rdata will be saved with a R object with all results
## report: an html report will be saved with details. remember to add also 'imaged'
## images: the images (bestmodel, all models, residuals) wil be generated
project.config$save=list('gitems', 'summary')

## the following parameters are used by the eval funtion

## +++++++++++++++++++++++++++++++++++++++
## try.models
## +++++++++++++++++++++++++++++++++++++++
## models to fit for prediciton. possible models:
## c('mean','trend','lm','es','arima','naive')
project.config$param$try.models=c('mean','trend','lm','es','arima','naive')

## +++++++++++++++++++++++++++++++++++++++
## n.ahead
## +++++++++++++++++++++++++++++++++++++++
## how many points will be predicted
project.config$param$n.ahead=6
project.config$param$range=c(-Inf,Inf)

## +++++++++++++++++++++++++++++++++++++++
## NA2value
## +++++++++++++++++++++++++++++++++++++++
## substitute NA2value to missing (NA) values 
project.config$param$NA2value=0

## +++++++++++++++++++++++++++++++++++++++
## n.min
## +++++++++++++++++++++++++++++++++++++++
## minimum number of values to perform models
## in try.models (naive if forced anyway)
project.config$param$n.min=5

## +++++++++++++++++++++++++++++++++++++++
## naive.values
## +++++++++++++++++++++++++++++++++++++++
## possible values are:
## -) last: the last value will be used for predictions
## -) lastPeriod: the mean of the last period (2 semester, 
##    12 month or so) will be used for predictions
## -) a number to be forced as prediction.
project.config$param$naive.values='lastPeriod'

## +++++++++++++++++++++++++++++++++++++++
## naive.ifConstantLastValues
## +++++++++++++++++++++++++++++++++++++++
## if yhe latest 'naive.ifConstantLastValues' historical data are constant
## the naive model will be forces
project.config$param$naive.ifConstantLastValues=max(12, 2 * project.config$period.freq)
project.config$param$naive.ifConstant0LastValues=project.config$period.freq


## +++++++++++++++++++++++++++++++++++++++
## logtransform
## +++++++++++++++++++++++++++++++++++++++
## locical: logtrasform data?
project.config$param$logtransform=FALSE

## +++++++++++++++++++++++++++++++++++++++
## stepwise
## +++++++++++++++++++++++++++++++++++++++
## logical: performs stepwise selection of the best linear model?
project.config$param$stepwise = TRUE

## +++++++++++++++++++++++++++++++++++++++
## formula.right.lm
## +++++++++++++++++++++++++++++++++++++++
## right part of the formula for linar model
project.config$param$formula.right.lm='S*trend+S*trend2'

## +++++++++++++++++++++++++++++++++++++++
## rule
## +++++++++++++++++++++++++++++++++++++++
## rule to select the best model. 
## BestAIC and BestIC are the actual options.
project.config$param$rule='BestAIC'

## +++++++++++++++++++++++++++++++++++++++
## rule.noMaxCVOver, rule.noMaxJumpOver
## +++++++++++++++++++++++++++++++++++++++
## exclude a candidate model if it has
## coefficient of variance (CV) or
## ratio among predicted and observed data (Jump)
## greater or equal to :
project.config$param$rule.noMaxCVOver=2
project.config$param$rule.noMaxJumpOver=1000000

## +++++++++++++++++++++++++++++++++++++++
## negTo0
## +++++++++++++++++++++++++++++++++++++++
## if TRUE, the negative predicted data will be converted to 0
project.config$param$negTo0=TRUE

## +++++++++++++++++++++++++++++++++++++++
## toInteger
## +++++++++++++++++++++++++++++++++++++++
## if TRUE, the historical data with decimals will be converted to integers
project.config$param$toInteger=TRUE
